<!DOCTYPE html >
<html lang="en" >
<head>
    <link rel="stylesheet" href="/resources/css/usersLogin.css">
    <link rel="icon" href="/resources/images/favicon.ico" sizes="32x32" />
    <link rel="stylesheet" media="screen" href="/resources/css/style.css">
    <link rel="stylesheet" type="text/css" href="/resources/css/reset.css"/>
    <script src="/resources/js/jquery-3.1.1.js"></script>
    <script src="/resources/layer/layer.js" type="text/javascript"></script>
    <script src="/resources/js/login.js"></script>
    <title>登录页面--LOGIN</title>
</head>
<body>
<form action="${pageContext.request.contextPath}/login" name="myform" method="post">
    <div id="particles-js">
        <div class="login">
            <div class="login-top">
                后台登录
            </div>
            <div class="login-center clearfix">
                <div class="login-center-img"><img src="/resources/images/name.png"/></div>
                <div class="login-center-input">
                    <input type="text" id="username" name="username" placeholder="请输入您的用户名" onfocus="this.placeholder=''" onblur="this.placeholder='请输入您的用户名'"/>
                    <div class="login-center-input-text">用户名</div>
                </div>
            </div>
            <div class="login-center clearfix">
                <div class="login-center-img"><img src="/resources/images/password.png"/></div>
                <div class="login-center-input">
                    <input type="password" id="password" name="password" placeholder="请输入您的密码" onfocus="this.placeholder=''" onblur="this.placeholder='请输入您的密码'"/>
                    <div class="login-center-input-text">密码</div>
                </div>
            </div>
            <div class="login-button" onclick="check()">
                登录
            </div>

        </div>
        <div class="sk-rotating-plane"></div>
    </div>
</form>
<script src="/resources/js/particles.min.js"></script>
<script src="/resources/js/appapp.js.js"></script>
<script type="text/javascript">
    function check() {
        var username = $("#username").val().trim();
        var password = $("#password").val().trim();
        if (username == null || username == "" || username.length == 0) {
            layer.msg('请输入用户帐号');
            return false;
        }
        if (password == null || password == "" || password.length == 0) {
            layer.msg('请输入登录密码');
            return false;
        }
        if (password.length < 4 || password.length > 20) {
            layer.msg('密码格式有误（4-20位字符）');
            return false;
        }
        document.myform.submit();
    }
</script>
</body>
</html>
